//数组的元素都为string类型
let arr1: string[] = ["北京", "上海", "广州"]

//数组的元素是string或number
let arr2: (string | number)[] = ["北京", "上海", 100, "广州",]

//数组元素是string或number组成的数组
let arr3: string | number[] = [100]
arr3 = "北京"
// arr3 = ["北京"]   //有错误


//元组：限定元素数量和元素类型（类型有前后顺序）
// let position: [number, number] = [100, "250"]


